package com.edu.service.impl;

import java.util.List;

import com.edu.bean.Carimg;
import com.edu.bean.Comment;
import com.edu.bean.Page;
import com.edu.dao.CarimgDao;
import com.edu.dao.impl.CarimgDaoImpl;
import com.edu.service.CarimgService;

public class CarimgServiceImpl implements CarimgService {
	CarimgDao cd = new CarimgDaoImpl();
	@Override
	public Page<Carimg> selectCarimgAll(Carimg carimg, int pageNum, int pageSize) {
		List<Carimg> listcarimg = cd.selectCarimgAll(pageNum, pageSize);
		int row = cd.selectCarimgtotal(carimg);
		Page<Carimg> page = new Page(listcarimg,pageNum,pageSize,row);
		return page;
	}

	@Override
	public int deleteCarimgById(int carimgid) {
		// TODO Auto-generated method stub
		return cd.deleteCarimgById(carimgid);
	}

	@Override
	public int updateCarimg(Carimg carimg) {
		// TODO Auto-generated method stub
		return cd.updateCarimg(carimg);
	}

	@Override
	public Carimg selectCommentById(int carimgid) {
		// TODO Auto-generated method stub
		return cd.selectCommentById(carimgid);
	}

	@Override
	public int addCarimg(Carimg carimg) {
		// TODO Auto-generated method stub
		return cd.addCarimg(carimg);
	}

}
